package org.catspaw.cherubim.persistence.spring.jdbc;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.commons.dbutils.RowProcessor;
import org.catspaw.cherubim.persistence.jdbc.dbutils.RowProcessorFactory;
import org.springframework.jdbc.core.RowMapper;

public class NameTrimmedMapRowMapper implements RowMapper {

	private RowProcessor rowProcessor = RowProcessorFactory
											  .getNameTrimmedBeanRowProcessor();

	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		return rowProcessor.toMap(rs);
	}
}
